package com.jiaoyou.baojian.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.jiaoyou.baojian.fragment.ShengyouListFragment;
import com.jiaoyou.baojian.utils.Utils;

/**
 * Created by DemonZYM on 17/4/12.
 */

public class ShengyouTabPagerAdapter extends FragmentPagerAdapter {
    public ShengyouTabPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        return ShengyouListFragment.newInstance(Utils.exchangeZhuboType(getPageTitle(position).toString()));
    }

    @Override
    public int getCount() {
        return 7;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        switch (position) {
            case 0:
                return "全部";
            case 1:
                return "少妇";
            case 2:
                return "人妻";
            case 3:
                return "熟女";
            case 4:
                return "御姐";
            case 5:
                return "萝莉";
            case 6:
                return "OL";
        }
        return null;
    }
}
